package com.fox.errorcode;

/**
 * @author wujie
 * @createTime: [2019/6/21 8:34]
 * @despretion 代码配置类
 */
public class ErrorCodePrintConfig {
    //enum加上英文是为了方便idea提示

    //12 bit
    public enum s服务码 {
        送修服务(0),
        基础服务(1),
        测试服务(4095);
        private int value;

        private s服务码(int value) {
            ErrorCodePrint.checkBit(12, value);
            this.value = value;
        }


        public int getValue() {
            return value;
        }

    }

    //4bit
    public enum f服务标志码 {
        失败或异常不区分失败或异常(0),
        失败或异常字段为失败情况(1),
        失败或异常字段为异常情况(2);
        private int value;

        private f服务标志码(int value) {
            ErrorCodePrint.checkBit(4, value);
            this.value = value;
        }


        public int getValue() {
            return value;
        }

    }

    //4bit,4bit
    public enum m模块码 {
        电话录音平台_本级(0, 0),
        电话录音平台_电信(0, 1),
        电话录音平台_联通(0, 2),
        电话录音平台_腾讯PSTN(0, 3);
        private int value1;
        private int value2;

        private m模块码(int value1, int value2) {
            ErrorCodePrint.checkBit(4, value1);
            ErrorCodePrint.checkBit(4, value2);
            this.value1 = value1;
            this.value2 = value2;
        }

        public int getValue1() {
            return value1;
        }

        public int getValue2() {
            return value2;
        }
    }

}
